import http from '../../utils/request'
// 获取部门信息数据
export function getDeptListInfo(params: any) {
  return http.request({
    url: '/deps',
    method: 'get',  
    params
  })
}

// 新增部门接口
export function addDept(data: any) {
  return http.request({
    url: '/dep',
    method: 'post',
    data
  })
}

// 删除部门接口
export function deleteDept(id:string) {
  return http.request({
    url: `/dep/${id}`,
    method: 'delete',
  })
}

// 根据id获取部门详情接口
export function getDeptInfoById(id:any) {
  return http.request({
    url: `/dep/${id}`,
    method: 'get',
  })
}

// 根据id修改部门信息
export function editDeptById(id:any,data:any) {
  return http.request({
    url: `/dep/${id}`,
    method: 'put',
    data
  })
}
